package com.example.myesstudy.dao;

import com.example.myesstudy.pojo.ReadBook;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface BookDao {


    @Select("select id as bookId,name as bookName,en_name as bookEnName,\n" +
            "comment_num as commentNum,price,author,imgurl,create_time as createTime,status,discription\n" +
            "from read_book_pd " +
            "limit #{params.offset},#{params.sizes}")
    List<ReadBook> queryFenye(@Param("params") Map<String, Object> params);

    @Select("select count(1) from read_book_pd")
    int queryCount();


}
